package com.woniu.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * lesson
 * @author 
 */
public class Lesson implements Serializable {
    /**
     * 课程id
     */
    private Integer lno;

    /**
     * 班级
     */
    private Integer cid;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd ")
    @JsonFormat(pattern = "yyyy-MM-dd ",timezone="GMT+8")
    private Date btime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd ")
    @JsonFormat(pattern = "yyyy-MM-dd ")
    private Date etime;

    /**
     * 课程模块
     */
    private String lmodule;

    /**
     * 方向
     */
    private String dirname;

    /**
     * 讲师teacher
     */
    private String name;

    /**
     * 教室
     */
    private String lclass;

    private static final long serialVersionUID = 1L;

    public Integer getLno() {
        return lno;
    }

    public void setLno(Integer lno) {
        this.lno = lno;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public Date getBtime() {
        return btime;
    }

    public void setBtime(Date btime) {
        this.btime = btime;
    }

    public Date getEtime() {
        return etime;
    }

    public void setEtime(Date etime) {
        this.etime = etime;
    }

    public String getLmodule() {
        return lmodule;
    }

    public void setLmodule(String lmodule) {
        this.lmodule = lmodule;
    }

    public String getDirname() {
        return dirname;
    }

    public void setDirname(String dirname) {
        this.dirname = dirname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLclass() {
        return lclass;
    }

    public void setLclass(String lclass) {
        this.lclass = lclass;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Lesson other = (Lesson) that;
        return (this.getLno() == null ? other.getLno() == null : this.getLno().equals(other.getLno()))
            && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getBtime() == null ? other.getBtime() == null : this.getBtime().equals(other.getBtime()))
            && (this.getEtime() == null ? other.getEtime() == null : this.getEtime().equals(other.getEtime()))
            && (this.getLmodule() == null ? other.getLmodule() == null : this.getLmodule().equals(other.getLmodule()))
            && (this.getDirname() == null ? other.getDirname() == null : this.getDirname().equals(other.getDirname()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getLclass() == null ? other.getLclass() == null : this.getLclass().equals(other.getLclass()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLno() == null) ? 0 : getLno().hashCode());
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getBtime() == null) ? 0 : getBtime().hashCode());
        result = prime * result + ((getEtime() == null) ? 0 : getEtime().hashCode());
        result = prime * result + ((getLmodule() == null) ? 0 : getLmodule().hashCode());
        result = prime * result + ((getDirname() == null) ? 0 : getDirname().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getLclass() == null) ? 0 : getLclass().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", lno=").append(lno);
        sb.append(", cid=").append(cid);
        sb.append(", btime=").append(btime);
        sb.append(", etime=").append(etime);
        sb.append(", lmodule=").append(lmodule);
        sb.append(", dirname=").append(dirname);
        sb.append(", name=").append(name);
        sb.append(", lclass=").append(lclass);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}